package cn.gson.work.controller;

import cn.gson.work.model.pojos.Huiyishi;
import cn.gson.work.model.service.HuiyishisSrevice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/hys")
public class HuiyishiController {
	@Autowired
    HuiyishisSrevice hs;

	@RequestMapping("/select")
	public List<Huiyishi> selectAll(){
		return hs.selectAll();
	}

	@RequestMapping("/add")
	public void addAll(@RequestBody Huiyishi hys){

		hs.addAdd(hys);
	}


}
